﻿using AutoMapper;
using Ecommerce.DTO;
using Ecommerce.tbCommodity;
using Ecommerce.tbUser;

namespace Ecommerce
{
    public class EcommerceApplicationAutoMapperProfile : Profile
    {
        public EcommerceApplicationAutoMapperProfile()
        {
            /* You can configure your AutoMapper mapping configuration here.
             * Alternatively, you can split your mapping configurations
             * into multiple profile classes for a better organization. */

            CreateMap<tbCommodityInfo, tbCommodityInfoDto>();
            CreateMap<CreateUpdateCommodityInfoDto, tbCommodityInfo>();

            CreateMap<tbCommodityType, tbCommodityTypeDto>();
            CreateMap<CreateUpdatetbCommodityTypeDto, tbCommodityType>();

            CreateMap<tbCommodityInfoImg, tbCommodityInfoImgDto>();
            CreateMap<CreateUpdatetbCommodityImgDto, tbCommodityInfoImg>();

            CreateMap<User, UserDto>();
            CreateMap<CreateUpdateUserDto, User>();

            CreateMap<tbShoppingCart, tbShoopingCartDto>();
            CreateMap<CreateUpdateShoppingCartDro, tbShoppingCart>();

            CreateMap<tbCollection, tbCollectionDto>();
            CreateMap<CreateUpdatetbCollectionDto, tbCollection>();

            CreateMap<tbOrderInfo, tbOrderInfoDto>();
            CreateMap<CreateUpdatetbOrderInfoDto, tbOrderInfo>();

            CreateMap<tbSaleNum, tbSaleNumDto>();
            CreateMap<CreateUpdatetbSaleNumDto, tbSaleNum>();
        }
    }
}
